package com.itheima.com;

import java.io.IOException;
import java.net.*;

public class UDPRevice {
    public static void main(String[] args) throws Exception {
        DatagramSocket ds = new DatagramSocket(22400);
        byte[] bytes = new byte[1024];
        DatagramPacket dp = new DatagramPacket(bytes,bytes.length);
        ds.receive(dp);
        byte[] data = dp.getData();
        System.out.println(new String(data));
        ds.close();
    }
}
